package com.responsibility.bll;

/*教务处*/
public class DeanOffice extends Approval {
    public DeanOffice(String name, Approval successor) {
        super(name, successor);
    }
    /*
     * 只能审批21--50天的假期
     * */
    public void handleRequest(Student stu) {
        int days = stu.getDays();
        if (days < 51) {
            System.out.println(String.format("%s审批了%s的请假：%s天。", this.name, stu.getName(), days));
        } else {/*不能审批,就将请求传递给后继者审批*/
            /*if (this.successor != null) {
                this.successor.handleRequest(stu);
            }*/
            super.handleRequest(stu);
        }
    }
}
